name: Tests

on:
  push:
    branches:
      - '**'        # run on ever branch except main (is covered by PR)
      - '!main'
jobs:
  Unit-Tests:
    name: unit-tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up Go
        uses: actions/setup-go@v5
        with:
          go-version: '1.21'
          cache: true
      - name: Unit test
        run: ./test/run.sh --unit-only
  Integration-Tests:
    name: integration-tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up Go
        uses: actions/setup-go@v5
        with:
          go-version: '1.21'
          cache: true
      - name: Integration test
        run: ./test/run.sh --integration-only
